//
//  V2NavigationController.m
//  V2EX
//
//  Created by 花菜ChrisCai on 2016/6/11.
//  Copyright © 2016年 Chris. All rights reserved.
//

#import "V2NavigationController.h"

@interface V2NavigationController ()

@end

@implementation V2NavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    if (self.viewControllers.count == 0) { // 根控制器
        viewController.navigationItem.leftBarButtonItem = [UIBarButtonItem gk_itemWithImage:[UIImage imageNamed:@"navi_menu_2"] highImage:nil target:self action:@selector(back)];
    }
    
    
    [super pushViewController:viewController animated:animated];
}

- (void)back
{
    
    [[NSNotificationCenter defaultCenter]postNotificationName:V2LeftBarButtonItemClickNotification object:nil];
    
}
@end
